package com.mr.core;

public class HashPartitioner implements Partitioner {
    @Override
    public int getPartition(Object key, int numPartitions) {
        return (key.hashCode() & Integer.MAX_VALUE) % numPartitions;
    }
}